#ifndef MAINWIN_H
#define MAINWIN_H

#include <QMainWindow>
#include <videomodel.h>
#include <QTimerEvent>
#include <QShowEvent>
#include <QCloseEvent>
#include "facetrain.h"
#include <QTimer>
#include <opencv2/opencv.hpp>
#include <opencv2/face.hpp>
#include <QTimerEvent>
#include <QLabel>
#include <opencv/cv.h>

using namespace cv;
using namespace cv::face;
namespace Ui {
class MainWin;
}

class MainWin : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWin(QWidget *parent = nullptr);
    ~MainWin();

    void timerEvent(QTimerEvent* e);


private slots:
    void update_train();

    void on_pushButton_clicked();

    void on_selectBt_clicked();


    void on_pushButton_2_clicked();



private:
    Ui::MainWin *ui;
    VideoModel *video;
    FaceTrain *mFaceTrain;
    cv::VideoCapture *cap;
    QTimer mtimer;
    int timerid;
    int timerid2;
    int userid;

};

#endif // MAINWIN_H
